package com.example.logisticsingle.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * 登录参数
 * @author Roskin
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="登录参数对象",description="登录参数对象")
public class UsernamePasswordLoginParams {

    /**
     *
     */
    private static final long serialVersionUID = 5854692784628794099L;

    @ApiModelProperty(position = 1,value="用户名",name="username",required = true,dataType="java.lang.String")
    @NotBlank(message="用户名不能为空")
    private String username;

    @ApiModelProperty(position = 2,value="密码",name="password",required = true,dataType="java.lang.String")
    @NotBlank(message="密码不能为空")
    private String password;

    @ApiModelProperty(position = 3,value="平台类型(PC/APP)",name="platform",required = true,dataType="java.lang.String")
    @NotBlank(message="平台类型不能为空")
    private String platform;

    @ApiModelProperty(value="Token有效期（精确到秒）",name="token_expire",dataType="java.lang.String")
    private long tokenExpire;

    @ApiModelProperty(value="记住我",name="remember_me",dataType="java.lang.Boolean")
    private boolean rememberMe;
}
